package com.wzqj.agent.web.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wzqj.agent.web.dao.PrivilegeDao;
import com.wzqj.agent.web.domain.Privilege;
import com.wzqj.agent.web.service.PrivilegeService;
/**
 * 权限业务实现层
 * @author gz
 *
 */
@Service("privilegeService")
public class PrivilegeServiceImpl implements PrivilegeService {

	@Autowired
	private PrivilegeDao privilegeDao;
	@Override
	public int insert(Privilege privilege) {
		privilegeDao.insert(privilege);
		return privilege.getId();
	}

	@Override
	public int delete(Integer id) {
		privilegeDao.delete(id);
		return id;
	}

	@Override
	public int update(Privilege privilege) {
		privilegeDao.update(privilege);
		return privilege.getId();
	}

	@Override
	public Privilege getById(Integer id) {
		return privilegeDao.getById(id);
	}

}
